createMember{
  return memberRepository.save(new Member(memberId));
}
findMember{
  return memberRepository.findByPropertyValue("memberId",memberId);
}
refer{
    Member refererMember=getOrCreateMember(referer);
    Member refereeMember=getOrCreateMember(referee);
    refererMember.refer(refereeMember);
    template.save(refererMember);
}
lock{
  LockManager lockManager=graphDatabaseAPI.getLockManager();
  lockManager.getWriteLock(node);
}
unlock{
    LockManager lockManager=graphDatabaseAPI.getLockManager();
    lockManager.releaseWriteLock(node,graphDatabaseAPI.getTxManager().getTransaction());
 catch (  SystemException e) {
}
getOrCreateMember{
  Member member=memberRepository.findByPropertyValue("memberId",memberId);
    member=memberRepository.save(new Member(memberId));
}
getOrCreateMemberWithoutUniqueIndexedMemberId{
  Node node=template.getOrCreateNode("Member","memberId",memberId,map("memberId",memberId));
  if (!node.hasProperty("__type__"))   template.postEntityCreation(node,Member.class);
  return template.load(node,Member.class);
}
